<div xmlns="http://www.w3.org/1999/xhtml" lang="en"
	 xmlns:f="http://typo3.org/ns/fluid/ViewHelpers"
	 xmlns:mf="http://typo3.org/ns/MiniFranske/FsMediaGallery/ViewHelpers">

	<f:section name="Lightbox">
		<f:if condition="{0:'colorbox'} == {0:settings.album.lightbox.jsPlugin}">
			<mf:embed.javaScript moveToFooter="TRUE">
jQuery(document).ready(function($) {
	var styleClass = '{settings.album.lightbox.styleClass}-{mediaAlbum.uid}';
	var relName = '{settings.album.lightbox.relPrefix}{mediaAlbum.uid}';
	var current = '{f:translate(key:'lightbox_current', default:'image {current} of {total}')}';
	$("." + styleClass).colorbox({
		rel:relName,
		maxWidth:function(){if($(window).width()<768){return '100%';}else{return '80%';}},
		maxHeight:function(){if($(window).width()<768){return '100%';}else{return '80%';}},
		title:function(){
			var title = $(this).data('title');
			if (title == '') {$("#cboxTitle").css('visibility','hidden');}else{$("#cboxTitle").css('visibility','visible');}
			return title;
		},
		current:current
	});
});
			</mf:embed.javaScript>
		</f:if>
	</f:section>

</div>